package com.kkb.utils.bean;

import lombok.Data;
import lombok.ToString;

import java.util.List;


/**
 * 封装数据，返回给前端
 * @Author 何世鹏
 * @Date 2021/2/13 2:01
 */
@Data
@ToString
public class MessageReturn {
    /**
     * 返回状态码
     */
    private String code;
    /**
     * 返回给前端信息
     */
    private String msg;
    /**
     * 数据总数
     */
    private String count;
    /**
     * 返回的数据
     */
    private List<?> data;

    public MessageReturn() {
    }

    public MessageReturn(String code, String msg, String count, List<?> data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public MessageReturn(String msg, String count, List<?> data) {
        this.code = "0";
        this.msg = msg;
        this.count = count;
        this.data = data;
    }
}
